Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

326
Visualizações
Why am I getting Backend Internal error: "Exception during IR lowering error" when using Jetpack Compose clickable-Modifier?

I am creating a custom Checkbox within a Surface which has a Modifier.clickable:

    Surface(
        modifier = Modifier
            .clickable(
                enabled = enabled,
                interactionSource = interactionSource,
                indication = rememberRipple(),
                role = Role.Checkbox,
                onClick = { onCheckedChange(!checked) }
            )
            .then(modifier),
    ) {
        Row {
            Checkbox(checked = checked, onCheckedChange = {}, colors = colors)
            Text(text = text ?: "")
        }
    }

When I try to build that, I get the Exception during IR lowering error error:

org.jetbrains.kotlin.backend.common.BackendException: Backend Internal error: Exception during IR lowering
File being compiled: /home/rene/AndroidStudioProjects/pass13/app/src/main/java/com/aresid/simplepasswordgeneratorapp/ui/widgets/Checkbox.kt

See the full stacktrace here.

Removing the Modifier.clickable solves the build issue.

I already tried up-/downgrading some versions but nothing is working properly.
Currently, I am using those versions:

    ext.versions = [
            'compileSdk': 31,
            'targetSdk' : 30,
            'minSdk'    : 26,
            'kotlin'    : '1.5.30',
            'navigation': '2.3.5',
            'compose'   : '1.0.2'
    ]

Has anybody an idea how to fix that?

over 4 years ago · Hanz Gallego
6 Respostas
Responde à pergunta

0

In my case I've created independent module to maintain components and theme independent of functional modules. So updating below in that modules gradle inside android, worked for me.

   android {
.
.
.
         buildFeatures {
                compose true
            }
            composeOptions {
                 kotlinCompilerExtensionVersion '1.0.3'
                 kotlinCompilerVersion '1.5.30'
            }
    }
over 4 years ago · Hanz Gallego Relatório

0

I solved my issue by following steps

  1. Clean project
  2. Delete .gradle and .idea folder
  3. Invalidate Caches/Restart
  4. Sync gradle
  5. Rebuild project
over 4 years ago · Hanz Gallego Relatório

0

This might sound counter-intuitive (after all, the error says "Backend Internal Error"), but for me, restarting the Android Studio client fixed it.

over 4 years ago · Hanz Gallego Relatório

0

So I got in touch with the JetBrains team via their issue tracker as @PhilipDukhov suggested and they solved my problem: https://youtrack.jetbrains.com/issue/KT-48815.

I was using kotlinCompilerExtensionVersion = versions.composeVersion in my app's build.gradle file and this is incorrect. versions.composeVersion is something provided by Gradle but it seems to be deprecated. Oneself should manually write the version which they're using there.

over 4 years ago · Hanz Gallego Relatório

0

In my case, I forgot to add in the build.gradle

android {
 ... 

    buildFeatures {
       compose true
    }
    composeOptions {
       kotlinCompilerExtensionVersion '1.0.3'
       kotlinCompilerVersion '1.5.30'
    }
}
over 4 years ago · Hanz Gallego Relatório

0

its because of JetpackCompose! in gradle 7.2 you should add these lines in build.gradle in android block:

  kotlinOptions {
        jvmTarget = "1.8"
    }
    
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.0.4"
    }
over 4 years ago · Hanz Gallego Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda